3.1.78 \(\int \frac {(e x)^{-1+n}}{a+b \sec (c+d x^n)} \, dx\) [78]

Optimal. Leaf size=87 \[ \frac {(e x)^n}{a e n}-\frac {2 b x^{-n} (e x)^n \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a+b}}\right )}{a \sqrt {a-b} \sqrt {a+b} d e n} \]

[Out]

(e*x)^n/a/e/n-2*b*(e*x)^n*arctanh((a-b)^(1/2)*tan(1/2*c+1/2*d*x^n)/(a+b)^(1/2))/a/d/e/n/(x^n)/(a-b)^(1/2)/(a+b
)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.227, Rules used = {4293, 4289, 3868, 2738, 214} \begin {gather*} \frac {(e x)^n}{a e n}-\frac {2 b x^{-n} (e x)^n \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a+b}}\right )}{a d e n \sqrt {a-b} \sqrt {a+b}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(e*x)^(-1 + n)/(a + b*Sec[c + d*x^n]),x]

[Out]

(e*x)^n/(a*e*n) - (2*b*(e*x)^n*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x^n)/2])/Sqrt[a + b]])/(a*Sqrt[a - b]*Sqrt[a +
b]*d*e*n*x^n)

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 2738

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[2*(e/d), Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]

Rule 3868

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(-1), x_Symbol] :> Simp[x/a, x] - Dist[1/a, Int[1/(1 + (a/b)*Sin[c
+ d*x]), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]

Rule 4289

Int[(x_)^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sec[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rule 4293

Int[((e_)*(x_))^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[e^IntPart[m]*((e*x
)^FracPart[m]/x^FracPart[m]), Int[x^m*(a + b*Sec[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]

Rubi steps

\begin {align*} \int \frac {(e x)^{-1+n}}{a+b \sec \left (c+d x^n\right )} \, dx &=\frac {\left (x^{-n} (e x)^n\right ) \int \frac {x^{-1+n}}{a+b \sec \left (c+d x^n\right )} \, dx}{e}\\ &=\frac {\left (x^{-n} (e x)^n\right ) \text {Subst}\left (\int \frac {1}{a+b \sec (c+d x)} \, dx,x,x^n\right )}{e n}\\ &=\frac {(e x)^n}{a e n}-\frac {\left (x^{-n} (e x)^n\right ) \text {Subst}\left (\int \frac {1}{1+\frac {a \cos (c+d x)}{b}} \, dx,x,x^n\right )}{a e n}\\ &=\frac {(e x)^n}{a e n}-\frac {\left (2 x^{-n} (e x)^n\right ) \text {Subst}\left (\int \frac {1}{1+\frac {a}{b}+\left (1-\frac {a}{b}\right ) x^2} \, dx,x,\tan \left (\frac {1}{2} \left (c+d x^n\right )\right )\right )}{a d e n}\\ &=\frac {(e x)^n}{a e n}-\frac {2 b x^{-n} (e x)^n \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a+b}}\right )}{a \sqrt {a-b} \sqrt {a+b} d e n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.29, size = 80, normalized size = 0.92 \begin {gather*} \frac {(e x)^n \left (d+c x^{-n}+\frac {2 b x^{-n} \tanh ^{-1}\left (\frac {(-a+b) \tan \left (\frac {1}{2} \left (c+d x^n\right )\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}\right )}{a d e n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(e*x)^(-1 + n)/(a + b*Sec[c + d*x^n]),x]

[Out]

((e*x)^n*(d + c/x^n + (2*b*ArcTanh[((-a + b)*Tan[(c + d*x^n)/2])/Sqrt[a^2 - b^2]])/(Sqrt[a^2 - b^2]*x^n)))/(a*
d*e*n)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.71, size = 314, normalized size = 3.61

method result size
risch \(\frac {x \,{\mathrm e}^{\frac {\left (-1+n \right ) \left (-i \mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right ) \pi +i \mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2} \pi +i \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2} \pi -i \mathrm {csgn}\left (i e x \right )^{3} \pi +2 \ln \left (e \right )+2 \ln \left (x \right )\right )}{2}}}{a n}+\frac {2 i \arctan \left (\frac {2 a \,{\mathrm e}^{i \left (d \,x^{n}+2 c \right )}+2 \,{\mathrm e}^{i c} b}{2 \sqrt {a^{2} {\mathrm e}^{2 i c}-{\mathrm e}^{2 i c} b^{2}}}\right ) e^{n} b \,{\mathrm e}^{\frac {i \left (-\pi n \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )+\pi n \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}+\pi n \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}-\pi n \mathrm {csgn}\left (i e x \right )^{3}+\pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )-\pi \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2}-\pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2}+\pi \mathrm {csgn}\left (i e x \right )^{3}+2 c \right )}{2}}}{\sqrt {a^{2} {\mathrm e}^{2 i c}-{\mathrm e}^{2 i c} b^{2}}\, d e n a}\) \(314\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^(-1+n)/(a+b*sec(c+d*x^n)),x,method=_RETURNVERBOSE)

[Out]

1/a/n*x*exp(1/2*(-1+n)*(-I*csgn(I*e)*csgn(I*x)*csgn(I*e*x)*Pi+I*csgn(I*e)*csgn(I*e*x)^2*Pi+I*csgn(I*x)*csgn(I*
e*x)^2*Pi-I*csgn(I*e*x)^3*Pi+2*ln(e)+2*ln(x)))+2*I*arctan(1/2*(2*a*exp(I*(d*x^n+2*c))+2*exp(I*c)*b)/(a^2*exp(2
*I*c)-exp(2*I*c)*b^2)^(1/2))/(a^2*exp(2*I*c)-exp(2*I*c)*b^2)^(1/2)/d/e*e^n/n/a*b*exp(1/2*I*(-Pi*n*csgn(I*e)*cs
gn(I*x)*csgn(I*e*x)+Pi*n*csgn(I*e)*csgn(I*e*x)^2+Pi*n*csgn(I*x)*csgn(I*e*x)^2-Pi*n*csgn(I*e*x)^3+Pi*csgn(I*e)*
csgn(I*x)*csgn(I*e*x)-Pi*csgn(I*e)*csgn(I*e*x)^2-Pi*csgn(I*x)*csgn(I*e*x)^2+Pi*csgn(I*e*x)^3+2*c))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)/(a+b*sec(c+d*x^n)),x, algorithm="maxima")

[Out]

-(2*a*b*n*e*integrate((a*cos(2*d*x^n + 2*c)*cos(d*x^n + c)*e^(n*log(x) + n) + 2*b*cos(d*x^n + c)^2*e^(n*log(x)
 + n) + a*e^(n*log(x) + n)*sin(2*d*x^n + 2*c)*sin(d*x^n + c) + 2*b*e^(n*log(x) + n)*sin(d*x^n + c)^2 + a*cos(d
*x^n + c)*e^(n*log(x) + n))/(a^3*x*cos(2*d*x^n + 2*c)^2*e + 4*a*b^2*x*cos(d*x^n + c)^2*e + a^3*x*e*sin(2*d*x^n
 + 2*c)^2 + 4*a^2*b*x*e*sin(2*d*x^n + 2*c)*sin(d*x^n + c) + 4*a*b^2*x*e*sin(d*x^n + c)^2 + 4*a^2*b*x*cos(d*x^n
 + c)*e + a^3*x*e + 2*(2*a^2*b*x*cos(d*x^n + c)*e + a^3*x*e)*cos(2*d*x^n + 2*c)), x) - e^(n*log(x) + n))*e^(-1
)/(a*n)

________________________________________________________________________________________

Fricas [A]
time = 2.51, size = 296, normalized size = 3.40 \begin {gather*} \left [\frac {2 \, {\left (a^{2} - b^{2}\right )} d x^{n} e^{\left (n - 1\right )} + \sqrt {a^{2} - b^{2}} b e^{\left (n - 1\right )} \log \left (\frac {2 \, a b \cos \left (d x^{n} + c\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x^{n} + c\right )^{2} + 2 \, a^{2} - b^{2} - 2 \, {\left (\sqrt {a^{2} - b^{2}} b \cos \left (d x^{n} + c\right ) + \sqrt {a^{2} - b^{2}} a\right )} \sin \left (d x^{n} + c\right )}{a^{2} \cos \left (d x^{n} + c\right )^{2} + 2 \, a b \cos \left (d x^{n} + c\right ) + b^{2}}\right )}{2 \, {\left (a^{3} - a b^{2}\right )} d n}, \frac {{\left (a^{2} - b^{2}\right )} d x^{n} e^{\left (n - 1\right )} - \sqrt {-a^{2} + b^{2}} b \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} b \cos \left (d x^{n} + c\right ) + \sqrt {-a^{2} + b^{2}} a}{{\left (a^{2} - b^{2}\right )} \sin \left (d x^{n} + c\right )}\right ) e^{\left (n - 1\right )}}{{\left (a^{3} - a b^{2}\right )} d n}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)/(a+b*sec(c+d*x^n)),x, algorithm="fricas")

[Out]

[1/2*(2*(a^2 - b^2)*d*x^n*e^(n - 1) + sqrt(a^2 - b^2)*b*e^(n - 1)*log((2*a*b*cos(d*x^n + c) - (a^2 - 2*b^2)*co
s(d*x^n + c)^2 + 2*a^2 - b^2 - 2*(sqrt(a^2 - b^2)*b*cos(d*x^n + c) + sqrt(a^2 - b^2)*a)*sin(d*x^n + c))/(a^2*c
os(d*x^n + c)^2 + 2*a*b*cos(d*x^n + c) + b^2)))/((a^3 - a*b^2)*d*n), ((a^2 - b^2)*d*x^n*e^(n - 1) - sqrt(-a^2
+ b^2)*b*arctan(-(sqrt(-a^2 + b^2)*b*cos(d*x^n + c) + sqrt(-a^2 + b^2)*a)/((a^2 - b^2)*sin(d*x^n + c)))*e^(n -
 1))/((a^3 - a*b^2)*d*n)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (e x\right )^{n - 1}}{a + b \sec {\left (c + d x^{n} \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)**(-1+n)/(a+b*sec(c+d*x**n)),x)

[Out]

Integral((e*x)**(n - 1)/(a + b*sec(c + d*x**n)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)/(a+b*sec(c+d*x^n)),x, algorithm="giac")

[Out]

integrate((e*x)^(n - 1)/(b*sec(d*x^n + c) + a), x)

________________________________________________________________________________________

Mupad [B]
time = 2.75, size = 223, normalized size = 2.56 \begin {gather*} \frac {x\,{\left (e\,x\right )}^{n-1}}{a\,n}+\frac {b\,x\,\ln \left (2\,b\,x\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\,{\left (e\,x\right )}^{n-1}-\frac {b\,x\,\left (a+b\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\right )\,{\left (e\,x\right )}^{n-1}\,2{}\mathrm {i}}{\sqrt {a+b}\,\sqrt {a-b}}\right )\,{\left (e\,x\right )}^{n-1}}{a\,d\,n\,x^n\,\sqrt {a+b}\,\sqrt {a-b}}-\frac {b\,x\,\ln \left (2\,b\,x\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\,{\left (e\,x\right )}^{n-1}+\frac {b\,x\,\left (a+b\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\right )\,{\left (e\,x\right )}^{n-1}\,2{}\mathrm {i}}{\sqrt {a+b}\,\sqrt {a-b}}\right )\,{\left (e\,x\right )}^{n-1}}{a\,d\,n\,x^n\,\sqrt {a+b}\,\sqrt {a-b}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^(n - 1)/(a + b/cos(c + d*x^n)),x)

[Out]

(x*(e*x)^(n - 1))/(a*n) + (b*x*log(2*b*x*exp(c*1i)*exp(d*x^n*1i)*(e*x)^(n - 1) - (b*x*(a + b*exp(c*1i)*exp(d*x
^n*1i))*(e*x)^(n - 1)*2i)/((a + b)^(1/2)*(a - b)^(1/2)))*(e*x)^(n - 1))/(a*d*n*x^n*(a + b)^(1/2)*(a - b)^(1/2)
) - (b*x*log(2*b*x*exp(c*1i)*exp(d*x^n*1i)*(e*x)^(n - 1) + (b*x*(a + b*exp(c*1i)*exp(d*x^n*1i))*(e*x)^(n - 1)*
2i)/((a + b)^(1/2)*(a - b)^(1/2)))*(e*x)^(n - 1))/(a*d*n*x^n*(a + b)^(1/2)*(a - b)^(1/2))

________________________________________________________________________________________